<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>首页</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    body {
      font-size: 14px;
      color: #333;
    }

    .banner {
      padding-bottom: 5px;
      background: #e7e7e7;
    }

    .banner img {
      display: block;
      width: 100%;
    }

    .banner p {
      padding: 5px 5px 0 5px;
      font-size: 16px;
    }

    .banner span {
      padding: 0 5px;
      display: block;
    }

    dl {
      padding: 5px;
      border-bottom: 1px dashed #999;
    }

    dl dt {
      font-size: 16px;
      font-weight: bold;
    }

    dl dd {}
  </style>
</head>

<body>
  <% for(let i = 0; i<banners.length; i ++) { %>    
    <div class="banner">
      <img src="<%= banners[i].src %>" />
      <p><%= banners[i].title %></p>
      <span><%= banners[i].sub_title %></span>
    </div>
  <% } %>
  <% for(let i = 0; i<articles.length; i ++) { %>
    <a href="/article?id=<%= articles[i].id %>">
    <dl>
      <dt><%= articles[i].title %></dt>
      <dd><%= articles[i].summary %></dd>
    </dl>
  <% } %>
</body>

</html>